package com.sdp.wz.db.wz_inventory_detail.service.impl;

import com.sdp.wz.db.wz_inventory_detail.entity.WzInventoryDetail;
import com.sdp.wz.db.wz_inventory_detail.mapper.WzInventoryDetailMapper;
import com.sdp.wz.db.wz_inventory_detail.service.IWzInventoryDetailService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zsp
 * @since 2024-07-29
 */
@Service
public class WzInventoryDetailServiceImpl extends ServiceImpl<WzInventoryDetailMapper, WzInventoryDetail> implements IWzInventoryDetailService {

	@Override
	public void removeWzInventoryDetailByInventoryId(String inventoryId) {
		LambdaQueryWrapper<WzInventoryDetail> queryWrapper = new LambdaQueryWrapper<>();
		queryWrapper.eq(WzInventoryDetail::getInventoryId,inventoryId);
		remove(queryWrapper);
	}

	@Override
	public List<WzInventoryDetail> queryWzInventoryDetailByInventoryId(String inventoryId) {
		LambdaQueryWrapper<WzInventoryDetail> queryWrapper = new LambdaQueryWrapper<>();
		queryWrapper.eq(WzInventoryDetail::getInventoryId,inventoryId);
		return list(queryWrapper);
	}

}
